#pragma .h #import <objc/Object.h> 
#pragma .h #import <appkit/Application.h> 
#import "NObject.h"
#import <appkit/Panel.h>
/**
 ** NObjects are just like Objects, 
 ** except that they do not kill off
 ** the application when they receive
 ** a message they can't understand.
 ** Instead, they pop up an alert panel.
 **/

@implementation NObject: Object
{
}

+ doesNotRecognize: (SEL)aSelector ;
{ int rval ;
  rval = NXRunAlertPanel("CB",
     "Error\n%s doesNotRecognize: %s","Continue","Abort CB",NULL,
     [self name], sel_getName(aSelector)) ;
  if(rval == 1) // i.e. continue
    return self ;
  else // i.e. abort
   [self error: "CB aborted by user\n"] ;
  return self ;
}

- doesNotRecognize: (SEL)aSelector ;
{ int rval ;
  rval = NXRunAlertPanel("CB",
     "Error\n%s doesNotRecognize: %s","Continue","Abort CB",NULL,
     [self name], sel_getName(aSelector)) ;
  if(rval == 1) // i.e. continue
    return self ;
  else // i.e. abort
   [self error: "CB aborted by user\n"] ;
  return self ;
}


@end